/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package promogui;

import java.util.ArrayList;

/**
 *
 * @author Friedemann Metzger
 */
public class AttributeChooser {
    

    public AttributeChooser() {
  
    }
    
    public static double getValue(Project project, int index, int week)
{
    int prodDataWeek = project.getProductDataCurrentWeek();
    boolean productDataFlag = (week > prodDataWeek);
    
    
    switch (index)
    {
    
        
        case 0:
            if (productDataFlag) week = prodDataWeek;
            return project.getLinesOfCode().get(week);
        case 1:
            if (productDataFlag) week = prodDataWeek;
            return project.getNumberOfTasks().get(week);
        case 2:
            if (productDataFlag) week = prodDataWeek;
            return project.getNumberOfBugs().get(week);
        case 3:
            if (productDataFlag) week = prodDataWeek;
            return project.getNumberOfComponents().get(week);
        case 4:
            if (productDataFlag) week = prodDataWeek;
            return project.getNumberOfTestCases().get(week);
            
        case 5:
            if (productDataFlag) week = prodDataWeek;
            return project.getPercentageOfSuccessfulTests().get(week);
        case 6:
            if (productDataFlag) week = prodDataWeek;
            return project.getPercentageOfCodeCoverage().get(week);
            
            
        case 7:
            return project.getEvolutionalWorkedRE().get(week);        
        case 8:
            return project.getEvolutionalWorkedAD().get(week);       
        case 9:
            return project.getEvolutionalWorkedPM().get(week);        
        case 10:
            return project.getEvolutionalWorkedBT().get(week);        
        case 11:
            return project.getEvolutionalWorkedII().get(week); 
            
            
            
        case 12:
            return project.getEvolutionalEstimatedRE().get(week);        
        case 13:
            return project.getEvolutionalEstimatedAD().get(week);       
        case 14:
            return project.getEvolutionalEstimatedPM().get(week);        
        case 15:
            return project.getEvolutionalEstimatedBT().get(week);        
        case 16:
            return project.getEvolutionalEstimatedII().get(week); 
            
            
            
        case 17:
            return project.getTotalEstimatedRE();  
        case 18:
            return project.getTotalEstimatedAD();       
        case 19:
            return project.getTotalEstimatedPM();        
        case 20:
            return project.getTotalEstimatedBT();        
        case 21:
            return project.getTotalEstimatedII(); 
            
       case 22:
             return project.getTotalEstimated();
       case 23:
             return project.getTotalWorked();
           
       case 24:
             return project.getEvolutionalWorked().get(week);
       
       
       case 25:
             return 100;
            

        default: return 1;
    
    
    }

}
    
    public static ArrayList<String> getParameterList()
    {
        ArrayList<String> list = new ArrayList<String>();
        
        list.add("Lines of Code");
        list.add("Number of Tasks");
        list.add("Number of Bugs") ;
        list.add("Number of Components") ;
        list.add("Number of Testcases");
        list.add("% succesfull Tests") ;            //5
        list.add("% of Code Coverage");    
        list.add("Worked RE");
        list.add("Worked AD");
        list.add("Worked PM");
        list.add("Worked BT");                      //10
        list.add("Worked II");
        list.add("Estimated RE");
        list.add("Estimated AD");
        list.add("Estimated PM");
        list.add("Estimated BT");                   //15
        list.add("Estimated II");
        
        
        list.add("Estimated Total RE");
        list.add("Estimated Total AD");
        list.add("Estimated Total PM");
        list.add("Estimated Total BT");             //20
        list.add("Estimated Total II");
        
        list.add("Total Estimated");
        list.add("Total Worked");
        list.add("Actual Worked");
        list.add("100") ;                           //25
        list.add("<none>") ;
        
        
        
        return list;
    
    
    }
    
    
    
    
    

    
    
    
        
}
